home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Mise à jour / Speech Recognition 1.5a1 / SR 1.5a1 Interfaces & Lib / SpeechRecognition.h < prev    next >
Text File  |  1995-12-08  |  21KB  |  470 lines

  1. /*
  2.      File:        SpeechRecognition.h
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.  
  8.                  Release:    PlainTalk Developer Release
  9.  
  10.      Copyright:    ⌐ 1984-1995 by Apple Computer, Inc.
  11.  
  12.                  All rights reserved.
  13.  
  14.      Bugs?:        If you find a problem with this file, send the file and version
  15.                  information (from above) and the problem description to:
  16.  
  17.                      Internet:    apple.bugs@applelink.apple.com
  18.                      AppleLink:    APPLE.BUGS
  19.  
  20. */
  21. #ifndef __SPEECHRECOGNITION__
  22. #define __SPEECHRECOGNITION__
  23.  
  24. #ifndef __MEMORY__
  25. #include <Memory.h>
  26. #endif
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. #if PRAGMA_ALIGN_SUPPORTED
  33. #pragma options align=mac68k
  34. #endif
  35.  
  36. #if PRAGMA_IMPORT_SUPPORTED
  37. #pragma import on
  38. #endif
  39.  
  40.  
  41. enum {
  42.     gestaltSpeechRecognitionVersion = 'srtb',
  43.     gestaltSpeechRecognitionAttr = 'srta'
  44. };
  45.  
  46.  
  47. enum {
  48.     gestaltDesktopSpeechRecognition = 1L << 0,
  49.     gestaltTelephoneSpeechRecognition = 1L << 1
  50. };
  51.  
  52. /* Error Codes [Speech recognition gets -5100 through -5199] */
  53.  
  54. enum {
  55.     eSRNotAvailable                = -5100,                        /* the service requested is not avail or applicable */
  56.     eSRInternalError            = -5101,                        /* a system internal or hardware error condition */
  57.     eSRComponentNotFound        = -5102,                        /* a needed system resource was not located */
  58.     eSROutOfMemory                = -5103,                        /* an out of memory error occurred in the toolbox memory space */
  59.     eSRNotASpeechObject            = -5104,                        /* the object specified is no longer or never was valid */
  60.     eSRBadParameter                = -5105,                        /* an invalid parameter was specified */
  61.     eSRParamOutOfRange            = -5106,                        /* when we say 0-100, don't pass in 101. */
  62.     eSRBadSelector                = -5107,                        /* an unrecognized selector was specified */
  63.     eSRBufferTooSmall            = -5108,                        /* returned from attribute access functions */
  64.     eSRNotARecSystem            = -5109,                        /* the object used was not a RecognitionSystem */
  65.     eSRFeedbackNotAvail            = -5110,                        /* there is no feedback window associated with Recognizer */
  66.     eSRCantSetProperty            = -5111,                        /* a non-settable property was specified */
  67.     eSRCantGetProperty            = -5112,                        /* a non-gettable property was specified */
  68.     eSRCantSetDuringRecognition    = -5113,                        /* the property can't be set while recognition is in progress -- do before or between utterances. */
  69.     eSRAlreadyListening            = -5114,                        /* in response to SRStartListening */
  70.     eSRNotListeningState        = -5115,                        /* in response to SRStopListening */
  71.     eSRModelMismatch            = -5116,                        /* no acoustical models are avail to match request */
  72.     eSRNoClientLanguageModel    = -5117,                        /* trying to access a non-specified LanguageModel */
  73.     eSRNoPendingUtterances        = -5118,                        /* nothing to continue search on */
  74.     eSRRecognitionCanceled        = -5119,                        /* an abort error occurred during search */
  75.     eSRRecognitionDone            = -5120,                        /* search has finished, but nothing was recognized */
  76.     eSROtherRecAlreadyModal        = -5121,                        /* another recognizer is modal at the moment, so can't set this recognizer's kBlockModally property right now */
  77.     eSRHasNoSubItems            = -5122,                        /* SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM. */
  78.     eSRSubItemNotFound            = -5123,                        /* returned when accessing a non-existent sub item of a container */
  79.     eSRLanguageModelTooBig        = -5124,                        /* Cant build language models so big */
  80.     eSRAlreadyReleased            = -5125,                        /* this object has already been released before */
  81.     eSRAlreadyFinished            = -5126,                        /* the language model can't be finished twice */
  82.     eSRWordNotFound                = -5127,                        /* the spelling couldn't be found in lookup(s) */
  83.     eSRNotFinishedWithRejection    = -5128,                        /* property not found because the LMObj is not finished with rejection */
  84.     eSRExpansionTooDeep            = -5129,                        /* Language model is left recursive or is embedded too many levels */
  85.     eSRTooManyElements            = -5130,                        /* Too many elements added to phrase or path or other langauge model object */
  86.     eSRCantAdd                    = -5131,                        /* Can't add given type of object to the base LanguageObject (e.g.in SRAddLanguageObject)    */
  87.     eSRSndInSourceDisconnected    = -5132,                        /* Sound input source is disconnected */
  88.     eSRCantReadLanguageObject    = -5133,                        /* An error while trying to create new Language object from file or pointer -- possibly bad format */
  89.                                                                 /* non-release debugging error codes are included here */
  90.     eSRNotImplementedYet        = -5199                            /* you'd better wait for this feature in a future release */
  91. };
  92.  
  93. /* Type Definitions */
  94. typedef unsigned long SpeechObject;
  95.  
  96. typedef SpeechObject RecognitionSystem;
  97.  
  98. typedef SpeechObject Recognizer;
  99.  
  100. typedef SpeechObject SpeechSource;
  101.  
  102. typedef SpeechSource RecognitionResult;
  103.  
  104. typedef SpeechObject LanguageObject;
  105.  
  106. typedef LanguageObject LanguageModel;
  107.  
  108. typedef LanguageObject LMPath;
  109.  
  110. typedef LanguageObject LMPhrase;
  111.  
  112. typedef LanguageObject LMWord;
  113.  
  114. typedef unsigned long LMFlags;
  115.  
  116. /* between 0 and 100 */
  117. typedef unsigned short SpeedSetting;
  118.  
  119. /* between 0 and 100 */
  120. typedef unsigned short RejectionLevel;
  121.  
  122. /* When an event occurs, the user supplied proc will be called with a pointer    */
  123. /*    to the param passed in and a flag to indicate conditions such                */
  124. /*    as interrupt time or system background time.                                */
  125. struct SRCallBackStruct {
  126.     long                             what;                        /* one of notification flags */
  127.     long                             message;                    /* contains RecognitionResult id */
  128.     Recognizer                         instance;                    /* ID of recognizer being notified */
  129.     OSErr                             status;                        /* result status of last search */
  130.     short                             flags;                        /* non-zero if occurs during interrupt */
  131.     long                             refCon;                        /* user defined - set from SRCallBackParam */
  132. };
  133. typedef struct SRCallBackStruct SRCallBackStruct;
  134.  
  135. /* Call back procedure definition */
  136. typedef pascal void (*SRCallBackProcPtr)(SRCallBackStruct *param);
  137.  
  138. #if GENERATINGCFM
  139. typedef UniversalProcPtr SRCallBackUPP;
  140. #else
  141. typedef SRCallBackProcPtr SRCallBackUPP;
  142. #endif
  143.  
  144. enum {
  145.     uppSRCallBackProcInfo = kPascalStackBased
  146.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(SRCallBackStruct *)))
  147. };
  148.  
  149. #if GENERATINGCFM
  150. #define NewSRCallBackProc(userRoutine)        \
  151.         (SRCallBackUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSRCallBackProcInfo, GetCurrentArchitecture())
  152. #else
  153. #define NewSRCallBackProc(userRoutine)        \
  154.         ((SRCallBackUPP) (userRoutine))
  155. #endif
  156.  
  157. #if GENERATINGCFM
  158. #define CallSRCallBackProc(userRoutine, param)        \
  159.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppSRCallBackProcInfo, (param))
  160. #else
  161. #define CallSRCallBackProc(userRoutine, param)        \
  162.         (*(userRoutine))((param))
  163. #endif
  164. struct SRCallBackParam {
  165.     SRCallBackUPP                     callBack;
  166.     long                             refCon;
  167. };
  168. typedef struct SRCallBackParam SRCallBackParam;
  169.  
  170. /* Recognition System Types */
  171.  
  172. enum {
  173.     kDefaultRecognitionSystemID    = 0
  174. };
  175.  
  176. /* Recognition System Properties */
  177.  
  178. enum {
  179.     kRejectedWord                = 'rejq',                        /* the LMWord used to represent a rejection */
  180.     kSeparationChars            = 'spch',                        /* separation chars for current dialect setting -- use pointer to SeparationChars struct, defined in Dialect.h */
  181.     kFeedbackAndListeningModes    = 'fbwn'                        /* short: one of kNoFeedbackHasListenModes, kHasFeedbackHasListenModes, kNoFeedbackNoListenModes */
  182. };
  183.  
  184.  
  185. enum {
  186.     kNoFeedbackNoListenModes    = 0,                            /* next allocated recognizer has no feedback window and doesn't use listening modes    */
  187.     kHasFeedbackHasListenModes    = 1,                            /* next allocated recognizer has feedback window and uses listening modes             */
  188.     kNoFeedbackHasListenModes    = 2                                /* next allocated recognizer has no feedback window but does use listening modes     */
  189. };
  190.  
  191. /* Speech Source Types */
  192.  
  193. enum {
  194.     kSRDefaultSpeechSource        = 0,
  195.     kLiveDesktopSpeechSource    = 'dklv',                        /* live desktop sound input */
  196.     kCannedDesktopSpeechSource    = 'ca22'                        /* AIFF file based 16 bit, 22.050 KHz sound input */
  197. };
  198.  
  199. /* Notification via Apple Event or Callback */
  200. /* Notification Flags */
  201.  
  202. enum {
  203.     kNotifyRecognitionBeginning    = 1L << 0,                        /* recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition */
  204.     kNotifyRecognitionDone        = 1L << 1                        /* recognition has terminated. result (if any) is available. */
  205. };
  206.  
  207. /* Apple Event selectors */
  208. /* AppleEvent message class  */
  209.  
  210. enum {
  211.     kAESpeechSuite                = 'sprc'
  212. };
  213.  
  214. /* AppleEvent message event ids */
  215.  
  216. enum {
  217.     kAESpeechDone                = 'srsd',
  218.     kAESpeechDetected            = 'srbd'
  219. };
  220.  
  221. /* AppleEvent Parameter ids */
  222.  
  223. enum {
  224.     keyRecognizer                = 'krec',
  225.     keySpeechResult                = 'kspr',
  226.     keySpeechStatus                = 'ksst'
  227. };
  228.  
  229. /* AppleEvent Parameter types */
  230.  
  231. enum {
  232.     typeRecognizer                = 'trec',
  233.     typeSpeechResult            = 'tspr'
  234. };
  235.  
  236. /* Recognizer Properties */
  237.  
  238. enum {
  239.     kSearchStatusParam            = 'stat',                        /* see status flags below */
  240.     kNotificationParam            = 'noti',                        /* see notification flags below */
  241.     kCallBackParam                = 'call',                        /* type SRCallBackParam */
  242.     kAutoFinishingParam            = 'afin',                        /* automatic finishing applied on LM for search */
  243.     kForegroundOnly                = 'fgon',                        /* Boolean. Default is true. If true, client recognizer only active when in foreground.    */
  244.     kBlockBackground            = 'blbg',                        /* Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.    */
  245.     kBlockModally                = 'blmd',                        /* Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods! */
  246.     kWantsResultTextDrawn        = 'txfb',                        /* Boolean. Default is true. If true, search results are posted to Feedback window */
  247.     kWantsAutoFBGestures        = 'dfbr',                        /* Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior */
  248.     kSoundInVolume                = 'volu',                        /* short in [0..100] log scaled sound input power. Can't set this property */
  249.     kReadAudioFSSpec            = 'aurd',                        /* *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kCannedDesktopSpeechSource. Reads until EOF */
  250.     kCancelOnSoundOut            = 'caso',                        /* Boolean: Default is true.  If any sound is played out during utterance, recognition is aborted. */
  251.     kSpeedVsAccuracyParam        = 'sped'                        /* SpeedSetting between 0 and 100 */
  252. };
  253.  
  254. /* 0 means more accurate but slower. */
  255. /* 100 means (much) less accurate but faster. */
  256.  
  257. enum {
  258.     kUseToggleListen            = 0,                            /* listen key modes */
  259.     kUsePushToTalk                = 1
  260. };
  261.  
  262.  
  263. enum {
  264.     kListenKeyMode                = 'lkmd',                        /* short: either kUseToggleListen or kUsePushToTalk */
  265.     kListenKeyCombo                = 'lkey',                        /* short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message */
  266.     kListenKeyName                = 'lnam',                        /* Str63: string representing ListenKeyCombo */
  267.     kKeyWord                    = 'kwrd',                        /* Str255: keyword preceding spoken commands in kUseToggleListen mode */
  268.     kKeyExpected                = 'kexp'                        /* Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur? */
  269. };
  270.  
  271. /* Operational Status Flags */
  272.  
  273. enum {
  274.     kIdleRecognizer                = 1L << 0,                        /* engine is not active */
  275.     kSearchInProgress            = 1L << 1,                        /* search is in progress */
  276.     kSearchWaitForAllClients    = 1L << 2,                        /* search is suspended waiting on all clients' input */
  277.     kMustCancelSearch            = 1L << 3,                        /* something has occurred (sound played, non-speech detected) requiring the search to abort */
  278.     kPendingSearch                = 1L << 4                        /* we're about to start searching */
  279. };
  280.  
  281. /* Recognition Result Properties */
  282.  
  283. enum {
  284.     kTEXTFormat                    = 'TEXT',                        /* raw text in user supplied memory */
  285.     kLMPhraseFormat                = 'lmph',                        /* LMPhrase containing result words */
  286.     kLMPathFormat                = 'lmpt',                        /* LMPath containing result phrases or words */
  287.     kLanguageModelFormat        = 'lmfm'                        /* top level LanguageModel for post parse */
  288. };
  289.  
  290. /* LanguageObject Family Properties */
  291.  
  292. enum {
  293.     kSpelling                    = 'spel',                        /* spelling of a LMWord or LMPhrase or LMPath, or name of a LanguageModel */
  294.     kLMObjType                    = 'lmtp',                        /* Returns one of LanguageObject Types listed below */
  295.     kRefCon                        = 'refc',                        /* 4 bytes of user storage */
  296.     kEnabled                    = 'enbl',                        /* Boolean -- true if LanguageObject enabled */
  297.     kOptional                    = 'optl',                        /* Boolean -- true if LanguageObject is optional    */
  298.     kRepeatable                    = 'rptb',                        /* Boolean -- true if LanguageObject is repeatable */
  299.     kRejectable                    = 'rjbl',                        /* Boolean -- true if LanguageObject is rejectable (Recognition System's kRejectedWord */
  300.                                                                 /*        object can be returned in place of LanguageObject with this property)    */
  301.     kPrimitive                    = 'prim',                        /* Boolean -- determines what shows up in search result's list of primitives */
  302.     kRejectionLevel                = 'rjct',                        /* RejectionLevel between 0 and 100 */
  303.     kFinishingFlags                = 'finf'                        /* Please use kOptional, kRepeatable, and kRejetable instead. pass pointer to LMFlags. Being phased out of public interfaces. */
  304. };
  305.  
  306. /* LM Object Types -- returned as kLMObjType property of language model objects */
  307.  
  308. enum {
  309.     kLMType                        = 'lmob',                        /* LanguageModel */
  310.     kPathType                    = 'path',                        /* LMPath */
  311.     kPhraseType                    = 'phra',                        /* LMPhrase */
  312.     kWordType                    = 'word'                        /* LMWord */
  313. };
  314.  
  315. /* a normal and reasonable rejection level */
  316.  
  317. enum {
  318.     kDefaultLMRejectionLevel    = 50
  319. };
  320.  
  321. /* Finishing Flags - used to make up LMFlags, which is used for kFinishingFlags and kAutoFinishingParam properties  */
  322. /* 4/10/95 These finishing flags are being phased out of the public interfaces.  Please use kOptional, kRepeatable, */
  323. /*    and kRejectable Boolean LanguageObject properties instead.  Those Boolean properties are easier to use.            */
  324.  
  325. enum {
  326.                                                                 /* bit zero is reserved */
  327.     kAddPauses                    = 1L << 1,                        /* allows user to pause between words */
  328.     kAddRejection                = 1L << 2,                        /* unrecognized words will be rejected */
  329.     kAddNoise                    = 1L << 3,                        /* allows a some noise at beginning or end of utterance */
  330.     kMakeOptional                = 1L << 4,                        /* contents of LM are optional */
  331.     kMakeRepeatable                = 1L << 5                        /* contents of LM may be repeated 0 or more times */
  332. };
  333.  
  334.  
  335. enum {
  336.     kAddWordSpotting            = (kAddRejection | kMakeRepeatable),
  337.     kDefaultFinishing            = kAddPauses,
  338.     kNoFinishing                = 0
  339. };
  340.  
  341. /********************************************************************************/
  342. /*                        NOTES ON USING THE API                                    */
  343. /*                                                                                */
  344. /*        All operations (with the exception of SRGetRecognitionSystem) are        */
  345. /*        directed toward an object allocated or begot from New, Get and Read        */
  346. /*        type calls.                                                                */
  347. /*                                                                                */
  348. /*        There is a simple rule in dealing with allocation and disposal:            */
  349. /*                                                                                */
  350. /*        *    all toolbox allocations are obtained from a RecognitionSystem        */
  351. /*                                                                                */
  352. /*        *    if you obtain an object via New or Get, then you own a reference     */
  353. /*            to that object and it must be released via SRReleaseObject when        */
  354. /*            you no longer need it                                                */
  355. /*                                                                                */
  356. /*        *    when you receive a RecognitionResult object via AppleEvent or        */
  357. /*            callback, it has essentially been created on your behalf and so        */
  358. /*            you are responsible for releasing it as above                        */
  359. /*                                                                                */
  360. /*        *    when you close a RecognitionSystem, all remaining objects which        */
  361. /*            were allocated with it will be forcefully released and any            */
  362. /*            remaining references to those objects will be invalid.                */
  363. /*                                                                                */
  364. /*        This translates into a very simple guideline:                            */
  365. /*            If you allocate it or have it allocated for you, you must release    */
  366. /*            it.  If you are only peeking at it, then don't release it.            */
  367. /*                                                                                */
  368. /********************************************************************************/
  369. /* Opening and Closing of the RecognitionSystem */
  370. extern pascal OSErr SROpenRecognitionSystem(RecognitionSystem *system, OSType systemID)
  371.  THREEWORDINLINE(0x303C, 0x0400, 0xAA56);
  372. extern pascal OSErr SRCloseRecognitionSystem(RecognitionSystem system)
  373.  THREEWORDINLINE(0x303C, 0x0201, 0xAA56);
  374. /* Accessing Properties of any Speech Object */
  375. extern pascal OSErr SRSetProperty(SpeechObject srObject, OSType selector, const void *property, Size propertyLen)
  376.  THREEWORDINLINE(0x303C, 0x0802, 0xAA56);
  377. extern pascal OSErr SRGetProperty(SpeechObject srObject, OSType selector, void *property, Size *propertyLen)
  378.  THREEWORDINLINE(0x303C, 0x0803, 0xAA56);
  379. /* Any object obtained via New or Get type calls must be released */
  380. extern pascal OSErr SRReleaseObject(SpeechObject srObject)
  381.  THREEWORDINLINE(0x303C, 0x0204, 0xAA56);
  382. extern pascal OSErr SRGetReference(SpeechObject srObject, SpeechObject *newObjectRef)
  383.  THREEWORDINLINE(0x303C, 0x0425, 0xAA56);
  384. /* Traversing RecognitionResult or LMObjects */
  385. extern pascal OSErr SRCountItems(SpeechObject container, long *count)
  386.  THREEWORDINLINE(0x303C, 0x0405, 0xAA56);
  387. extern pascal OSErr SRGetIndItem(SpeechObject container, SpeechObject *item, long index)
  388.  THREEWORDINLINE(0x303C, 0x0606, 0xAA56);
  389. extern pascal OSErr SRSetIndItem(SpeechObject container, SpeechObject item, long index)
  390.  THREEWORDINLINE(0x303C, 0x0607, 0xAA56);
  391. extern pascal OSErr SRRemoveIndItem(SpeechObject container, long index)
  392.  THREEWORDINLINE(0x303C, 0x0408, 0xAA56);
  393. /* Recognizer Instance Functions */
  394. extern pascal OSErr SRNewRecognizer(RecognitionSystem system, Recognizer *instance, OSType sourceID)
  395.  THREEWORDINLINE(0x303C, 0x060A, 0xAA56);
  396. extern pascal OSErr SRStartListening(Recognizer instance)
  397.  THREEWORDINLINE(0x303C, 0x020C, 0xAA56);
  398. extern pascal OSErr SRStopListening(Recognizer instance)
  399.  THREEWORDINLINE(0x303C, 0x020D, 0xAA56);
  400. extern pascal OSErr SRSetLanguageModel(Recognizer instance, LanguageModel active)
  401.  THREEWORDINLINE(0x303C, 0x040E, 0xAA56);
  402. extern pascal OSErr SRGetLanguageModel(Recognizer instance, LanguageModel *active)
  403.  THREEWORDINLINE(0x303C, 0x040F, 0xAA56);
  404. extern pascal OSErr SRContinueRecognition(Recognizer instance)
  405.  THREEWORDINLINE(0x303C, 0x0210, 0xAA56);
  406. extern pascal OSErr SRCancelRecognition(Recognizer instance)
  407.  THREEWORDINLINE(0x303C, 0x0211, 0xAA56);
  408. extern pascal OSErr SRIdle(void )
  409.  THREEWORDINLINE(0x303C, 0x0028, 0xAA56);
  410. /* Language Model Building and Manipulation Functions */
  411. extern pascal OSErr SRNewLanguageModel(RecognitionSystem system, LanguageModel *model, const void *name, Size nameLength)
  412.  THREEWORDINLINE(0x303C, 0x0812, 0xAA56);
  413. extern pascal OSErr SRNewPath(RecognitionSystem system, LMPath *path)
  414.  THREEWORDINLINE(0x303C, 0x0413, 0xAA56);
  415. extern pascal OSErr SRNewPhrase(RecognitionSystem system, LMPhrase *phrase, const void *text, Size textLength)
  416.  THREEWORDINLINE(0x303C, 0x0814, 0xAA56);
  417. extern pascal OSErr SRNewWord(RecognitionSystem system, LMWord *word, const void *text, Size textLength)
  418.  THREEWORDINLINE(0x303C, 0x0815, 0xAA56);
  419. /* Operations on any object of the LanguageObject family */
  420. extern pascal OSErr SRPutLanguageObjectIntoHandle(LanguageObject lobj, Handle lobjHandle)
  421.  THREEWORDINLINE(0x303C, 0x0416, 0xAA56);
  422. extern pascal OSErr SRPutLanguageObjectIntoDataFile(LanguageObject lobj, short fRefNum)
  423.  THREEWORDINLINE(0x303C, 0x0328, 0xAA56);
  424. extern pascal OSErr SRNewLanguageObjectFromHandle(RecognitionSystem system, LanguageObject *lobj, Handle lObjHandle)
  425.  THREEWORDINLINE(0x303C, 0x0417, 0xAA56);
  426. extern pascal OSErr SRNewLanguageObjectFromDataFile(RecognitionSystem system, LanguageObject *lobj, short fRefNum)
  427.  THREEWORDINLINE(0x303C, 0x0427, 0xAA56);
  428. extern pascal OSErr SREmptyLanguageObject(LanguageObject lobj)
  429.  THREEWORDINLINE(0x303C, 0x0218, 0xAA56);
  430. extern pascal OSErr SRChangeLanguageObject(LanguageObject lobj, const void *text, Size textLength)
  431.  THREEWORDINLINE(0x303C, 0x0619, 0xAA56);
  432. extern pascal OSErr SRAddLanguageObject(LanguageObject base, LanguageObject addon)
  433.  THREEWORDINLINE(0x303C, 0x041A, 0xAA56);
  434. extern pascal OSErr SRAddText(LanguageObject base, const void *text, Size textLength, long refCon)
  435.  THREEWORDINLINE(0x303C, 0x081B, 0xAA56);
  436. extern pascal OSErr SRRemoveLanguageObject(LanguageObject base, LanguageObject toRemove)
  437.  THREEWORDINLINE(0x303C, 0x041C, 0xAA56);
  438. /* Utilizing the System Feedback Window */
  439. extern pascal OSErr SRProcessBegin(Recognizer instance, Boolean failed)
  440.  THREEWORDINLINE(0x303C, 0x031D, 0xAA56);
  441. extern pascal OSErr SRProcessEnd(Recognizer instance, Boolean failed)
  442.  THREEWORDINLINE(0x303C, 0x031E, 0xAA56);
  443. extern pascal OSErr SRSpeakAndDrawText(Recognizer instance, const void *text, Size textLength)
  444.  THREEWORDINLINE(0x303C, 0x061F, 0xAA56);
  445. extern pascal OSErr SRSpeakText(Recognizer instance, const void *speakText, Size speakLength)
  446.  THREEWORDINLINE(0x303C, 0x0620, 0xAA56);
  447. extern pascal OSErr SRStopSpeech(Recognizer recognizer)
  448.  THREEWORDINLINE(0x303C, 0x0223, 0xAA56);
  449. extern pascal short SRSpeechBusy(Recognizer recognizer)
  450.  THREEWORDINLINE(0x303C, 0x0224, 0xAA56);
  451. extern pascal OSErr SRDrawText(Recognizer instance, const void *dispText, Size dispLength)
  452.  THREEWORDINLINE(0x303C, 0x0621, 0xAA56);
  453. extern pascal OSErr SRDrawRecognizedText(Recognizer instance, const void *dispText, Size dispLength)
  454.  THREEWORDINLINE(0x303C, 0x0622, 0xAA56);
  455.  
  456. #if PRAGMA_IMPORT_SUPPORTED
  457. #pragma import off
  458. #endif
  459.  
  460. #if PRAGMA_ALIGN_SUPPORTED
  461. #pragma options align=reset
  462. #endif
  463.  
  464. #ifdef __cplusplus
  465. }
  466. #endif
  467.  
  468. #endif /* __SPEECHRECOGNITION__ */
  469.  
  470.